The present invention relates generally to improved bar code scanning and processing. More particularly, the invention relates to methods and apparatus for achieving a highly precise determination of the position of a rotating optical element, or spinner, of a scanner, in order to provide a reference position for the spinner, which is used in computation of the position of the spinner in order to control elements of the scanner used to produce a desired scan pattern.
Bar code scanners are used in a wide variety of applications and provide a fast and convenient way to collect data. Bar code scanners typically operate in one of at least two modes. A scanner may operate in an omnidirectional or multiline scan mode, producing a multiline scan pattern in which an array of scan lines is used to illuminate a bar code. Alternatively, a scanner may operate in a single line mode, producing a single scan line which is used to illuminate a bar code. A scanner may suitably be designed to operate exclusively in a single line or multiline mode, or may alternatively be designed so that the desired mode can be selected. Operation of a scanner in a single line mode provides the advantage of allowing an operator to aim the scan line more precisely, in order to avoid inadvertently scanning bar codes which may be located near the bar code which it is desired to scan.
In order to produce a scan pattern, a scanner directs a laser beam from a laser source to a mirrored polygonal spinner which is rotated by an electric motor. The sides of the polygonal spinner may be referred to as facets. The spinner directs light to one or more mirrors in order to produce a scan pattern which is directed to and emerges from an aperture. It is possible to design a scanner which produces only an omnidirectional scan pattern. In a scanner having such a design, the laser source may simply be turned on continuously as the spinner rotates. The laser beam is sequentially directed by the spinner over the entire set of pattern mirrors, which reflect the laser beam to produce lines making up the scan pattern. Alternatively, it is possible to design a scanner which produces only a single line scan pattern. In such a scanner, the pattern mirror and other optical components of the scanner may be arranged and configured so that the laser source may remain activated at all times, while the laser beam is reflected out of the scanner so as to form a single line scan pattern.
In order to provide greater flexibility in operation, it may be desirable to design a scanner which can operated in an omnidirectional or a single line scan mode, depending on a user selection or other criteria. In designing such a scanner, it is desirable to use a single set of pattern mirrors to minimize the cost and complexity of the scanner. The pattern mirrors and other internal optics are designed in such a way that a multiline scan pattern will be produced if the laser beam remains activated at all times during the rotation of the spinner, and that a single line scan pattern will be produced if the laser beam is activated and deactivated when the spinner is in appropriate positions. Typically, the laser source is activated when the spinner is oriented such that the laser beam is reflected by the spinner so as to be directed to an initial position and remains activated while the spinner turns so that the reflected laser beam is swept from the initial position to a terminal position. The laser source is deactivated when the reflected laser beam reaches the terminal position, and remains deactivated while the spinner turns, until the spinner is once again in a position to direct the reflected laser beam to the initial position.
In order to produce a single line scan pattern by controlling activation and deactivation of the laser source, it is important to turn the laser source on and off when the spinner is at the correct positions. Because the speed of the spinner is typically constant once the spinner has achieved operating speed, the relative position of the spinner can be known once the spinner has achieved operating speed. For example, it is possible to know when the spinner has turned through 20 degrees from a reference position. However, in order to know the actual position of the spinner at a particular time, it is necessary to accurately determine that the spinner is in a particular known position, or reference position, at some point after the spinner has achieved operating speed. Using a sensing device to determine when the spinner is in a reference position is difficult because variations from motor to motor make it difficult to adapt a sensor to determine the position of the specific motor used, and because additional difficulties are introduced by the acceleration period while the spinner is started and brought to operating speed. There exists, therefore, a need for a highly accurate way to identify when a spinner is at a reference position.
A scanner according to the present invention includes a laser source, a spinner rotated by a motor, a controller for controlling the speed and operation of the motor and a reference position photodetector. Because the spinner is affixed to the motor, the relative position of the motor determines the relative position of the spinner. The scanner also includes a set of pattern mirrors having a diffractive element. The diffractive element is positioned so as to be struck by a laser beam reflected from the spinner when the spinner is in the reference position. When the diffractive element is struck by the laser beam, the element generates a refracted line orthogonal to the direction of scan. The refracted line strikes the reference position photodetector. When the refracted line strikes the reference position detector, a signal is generated which can be read by the controller to determine that the spinner is in a reference position. In one particularly advantageous mode of operation, the laser beam may be activated when the spinner is positioned to direct the laser beam to an initial point of a single line scan pattern. The spinner turns, causing the laser beam to trace through the scan pattern. The reference position is chosen to coincide with the terminal position of the laser beam at the scan pattern, so that when the laser beam reaches the reference position, the beam strikes the diffractive element, causing a refracted line to be produced. The refracted line strikes the reference position photodetector. The reference position photodetector sends a signal to the controller, allowing the controller to detect that the laser beam is at the reference position. Because the reference position is also the terminal position of the scan pattern, the controller causes the laser beam to be deactivated. Once the controller determines that the spinner is in a reference position, the relative position of the spinner can be determined by, for example, using the known speed of the spinner and computing the displacement of the spinner from the reference position using the elapsed time and the speed of the spinner. Because the reference position has been precisely determined and the relative position can be computed, it is possible for the controller to compute when the spinner will again reach the correct position so that the laser beam may be activated in order to be deflected to the initial position of the scan pattern.
A more complete understanding of the present invention, as well as further features and advantages of the invention, will be apparent from the following Detailed Description and the accompanying drawings.